home *** CD-ROM | disk | FTP | other *** search
/ Windows 3-Pak 2 - Disc 2 / Infomagic - Windows 3-Pak Volume 2 (Disc 2 of 3).iso / Chat---IRC / TURBOIRC.ZIP / data1.cab / TurboIRC_Scripts / 3strikes.txt next >
Text File  |  1999-05-05  |  2KB  |  94 lines

  1. // Channel Status TurboIRC Script
  2. // Category : Defense
  3. // Copyright ⌐ Chourdakis Michael , 1998
  4.  
  5. // This script is the same like PIRCH's 3STRIKES PIL
  6. // or load it automatically : /_event ONBADTEXT 21 2 0 +* PRIVMSG * :*|||-:* PRIVMSG $mynick :*|||?.\demos\badtext.txt
  7.  
  8. // We used 21 for "Enabled" , "Afterfire" and "GlobalMatch"
  9. // the 2 after requires for us to be @ or owner in the channel 
  10.  
  11. // You may add more banned words
  12.  
  13. // This event users IntegerList[3] 
  14.  
  15. // $3* holds the text
  16. string BadWords = "*FUCK* *POUSTI* *MALAKAS* *STUPID*"
  17. string TestStr = ""
  18. for (int K = 0 ; K < 4 ; K += 1)
  19. TestStr = ""
  20. TestStr = GetParameter(K,BadWords)
  21. if (TestStr=="")
  22.  return
  23. endif
  24. if (IsMatching("$3*",TestStr,1,0)==1)
  25.  goto BadMatched
  26. endif
  27. endfor
  28.  
  29. // nothing matched !
  30. return
  31.  
  32.  
  33.  
  34.  
  35. :BadMatched
  36.  
  37.  
  38. if (FindStringPos(GetClientMode(),"x")==-1)
  39.  goto NotIRCX
  40. endif
  41.  
  42. // Get User's level
  43. int Z = GetUserData($nick,3)
  44. if (Z==0)
  45.  // FIRST warning
  46.  /target $channel +$nick
  47.  /display $channel $nick , this is your 4,8FIRST1,0 warning ! Please do not say such word(s) here !
  48.  /target $channel
  49.  /setuserdata $nick 3 1
  50.  return 0
  51. endif
  52.  
  53. if (Z==1)
  54.  // LAST warning
  55.  /target $channel +$nick
  56.  /display $channel $nick , this is your 8,4LAST1,0 warning !! If you keep talking like this , you will get in trouble !!
  57.  /target $channel 
  58.  /setuserdata $nick 3 2
  59.  return 0
  60. endif
  61.  
  62. if (Z==2)
  63.  // KICK
  64.  /setuserdata $nick 3 0
  65.  /mode $channel +b %DefaultBanFromMask("$0")%
  66.  /kick $channel $nick You really made me mad !!
  67.  return 0
  68. endif
  69.  
  70. :NotIRCX
  71. // Get User's level
  72. int Z = GetUserData($nick,3)
  73. if (Z==0)
  74.  // FIRST warning
  75.  /display $channel $nick , this is your 4,8FIRST1,0 warning ! Please do not say such word(s) here !
  76.  /setuserdata $nick 3 1
  77.  return 0
  78. endif
  79.  
  80. if (Z==1)
  81.  // LAST warning
  82.  /display $channel $nick , this is your 8,4LAST1,0 warning !! If you keep talking like this , you will get in trouble !!
  83.  /setuserdata $nick 3 2
  84.  return 0
  85. endif
  86.  
  87. if (Z==2)
  88.  // KICK
  89.  /setuserdata $nick 3 0
  90.  /mode $channel +b %DefaultBanFromMask("$0")%
  91.  /kick $channel $nick You really made me mad !!
  92.  return 0
  93. endif
  94.